﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCMoreFile.ascx.cs" Inherits="UserControl_UCMoreFile" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script type="text/javascript" src="../JavaScript/swfupload.js"></script>

<script type="text/javascript" src="../JavaScript/handlers.js"></script>

<style type="text/css">
    .swtjwj
    {
        color: #999999;
    }
    .dgtjwj
    {
        color: #990000;
    }
    td
    {
        font-size: 12px;
    }
    .input1
    {
        font-size: 13px;
        color: #000000;
        background-color: #FFFFFF;
        border: 1px solid #000000;
        width: 100%;
    }
    #filep
    {
        white-space: pre;
        height: 34px;
        width: 103px;
        overflow: hidden;
    }
    A:link
    {
        color: #000000;
        text-decoration: none;
    }
    A:visited
    {
        color: #000000;
        text-decoration: none;
    }
    A:hover
    {
        color: #ff0000;
        text-decoration: none;
    }
    .file1
    {
        height: 34px;
        font-size: 19px;
        margin-left: -55px;
        border: none;
        position: absolute;
        left: 13px;
        top: 3px;
    }
    #nofile div
    {
        font-size: 12px;
        white-space: pre;
        height: 20px;
        overflow: hidden;
    }
    #nofile img
    {
        font-size: 12px;
        white-space: pre;
        overflow: hidden;
        padding: 0px;
        margin-top: 0px;
        margin-right: 0px;
        margin-bottom: -3px;
        margin-left: 0px;
    }
    #dtitle
    {
        font-size: 14px;
        font-weight: bold;
        color: #FFFFFF;
        background-image: url(../images/fileupload/liulan_bg.gif);
        background-repeat: repeat-x;
        letter-spacing: 4px;
    }
    .input2
    {
        font-size: 13px;
        color: #000000;
        background-color: #FFF4DD;
        border: 1px solid #C48900;
        width: 100%;
    }
</style>

<script type="text/javascript">
    var conPreName = "<%=ControlName%>";
    var upLimit = "<%=UpLimit%>";
    
    var swfu;
    window.onload = function() {
        swfu = new SWFUpload({
            // Backend Settings
            upload_url: "../UserControl/UpFileAction.aspx",
            post_params: { savePath: 'e:\\upload\\' },

            // File Upload Settings
            file_size_limit: "300 MB",
            file_types: "*.*",
            file_types_description: "All Files",
            file_upload_limit: "<%=UpLimit%>",    // Zero means unlimited
            
            // Event Handler Settings - these functions as defined in Handlers.js
            //  The handlers are not part of SWFUpload but are part of my website and control how
            //  my website reacts to the SWFUpload events.
            file_queue_error_handler: fileQueueError,
            file_dialog_start_handler:fileDialogStart,
            file_dialog_complete_handler: fileDialogComplete,
            upload_progress_handler: uploadProgress,
            upload_error_handler: uploadError,
            upload_success_handler: uploadSuccess,
            upload_complete_handler: uploadComplete,

            // Button settings
            button_image_url: "../images/XPButtonNoText_160x22.png",
            button_placeholder_id: "spanButtonPlaceholder",
            button_width: 160,
            button_height: 22,
            button_text: '<span class="button">添加附件 <span class="buttonSmall">(最大300M)</span></span>',
            button_text_style: '.button { font-family: 宋体; font-size: 12pt; } .buttonSmall { font-size: 12pt; }',
            button_text_top_padding: 1,
            button_text_left_padding: 15,
            button_action: <%=btnAction%>, //设置Flash本身的文件上传对话框的行为

            button_disabled: <%=Setreadonly%>,
            button_cursor : SWFUpload.CURSOR.HAND,
            button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,
            
            // Flash Settings
            flash_url: "../JavaScript/swfupload.swf", // Relative to this file

            custom_settings: {
                upload_target: "divFileProgressContainer"
            },

            // Debug Settings
            debug: false
        });
    }

</script>

<div id="content">
    <div id="swfu_container" style="margin: 0px 10px;">
        <div id="swfBtn">
            <span id="spanButtonPlaceholder"></span>
        </div>
        <table id="tbUpResult" cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 19px">
        </table>
        <div id="divFileProgressContainer" style="height: 1px; display: none;">
        </div>
        <ext:Button ID="extBtnResh" runat="server" Hidden="true" Height="0">
        </ext:Button>
    </div>
</div>
<asp:HiddenField ID="Hdn_SaveFilesInfo" runat="server" />
<asp:HiddenField ID="Hdn_SavedDelFiles" runat="server" />
